home *** CD-ROM | disk | FTP | other *** search
- unit Id_main;
-
- {
-
- $Log: W:/users/prodigy/prodig~1/archive/inifile/id_main.pav $
- *
- * Rev 1.25 28 Jan 1996 12:37:16 PaulK
- * Cosmetic changes
- *
- * Rev 1.21 14 Jan 1996 11:56:24 PaulK
- * Changes to permit bitmapped RBs
- *
- * Rev 1.0 13 Jan 1996 18:56:32 PaulK
- * Initial revision.
-
- }
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, ExtCtrls, TabNotBk, IniCtrls, Grids, Buttons;
-
- type
- TForm1 = class(TForm)
- TabbedNotebook1: TTabbedNotebook;
- WinIniSource: TIniSource;
- SolIniSource: TIniSource;
- IniEdit1: TIniEdit;
- IniNEdit1: TIniNEdit;
- IniNEdit2: TIniNEdit;
- IniNEdit3: TIniNEdit;
- IniGrid1: TIniGrid;
- IniRadioButton1: TIniRadioButton;
- Image1: TImage;
- IniRadioButton2: TIniRadioButton;
- Image2: TImage;
- IniRadioButton3: TIniRadioButton;
- Image3: TImage;
- IniRadioButton4: TIniRadioButton;
- Image4: TImage;
- IniRadioButton5: TIniRadioButton;
- Image5: TImage;
- IniRadioButton6: TIniRadioButton;
- Image6: TImage;
- IniRadioButton7: TIniRadioButton;
- Image7: TImage;
- IniRadioButton8: TIniRadioButton;
- Image8: TImage;
- IniRadioButton9: TIniRadioButton;
- Image9: TImage;
- IniRadioButton10: TIniRadioButton;
- Image10: TImage;
- IniRadioButton11: TIniRadioButton;
- Image11: TImage;
- IniRadioButton12: TIniRadioButton;
- Image12: TImage;
- IniRadioButton13: TIniRadioButton;
- IniRadioButton14: TIniRadioButton;
- IniRadioButton15: TIniRadioButton;
- IniRadioButton16: TIniRadioButton;
- IniRadioButton17: TIniRadioButton;
- IniCheckBox1: TIniCheckBox;
- IniCheckBox2: TIniCheckBox;
- IniCheckBox3: TIniCheckBox;
- IniCheckBox4: TIniCheckBox;
- IniCheckBox5: TIniCheckBox;
- Btn_Next: TButton;
- Btn_Finish: TButton;
- Btn_Back: TButton;
- Btn_Save: TButton;
- Btn_View: TButton;
- Btn_Play: TButton;
- Btn_Licence: TBitBtn;
- ListBox1: TListBox;
- ListBox2: TListBox;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Label4: TLabel;
- Label5: TLabel;
- Label6: TLabel;
- Label7: TLabel;
- Label8: TLabel;
- Label9: TLabel;
- Label10: TLabel;
- Label11: TLabel;
- Label12: TLabel;
- Label13: TLabel;
- Label14: TLabel;
- Label15: TLabel;
- Label16: TLabel;
- Label18: TLabel;
- Label19: TLabel;
- Label20: TLabel;
- Label21: TLabel;
- Label22: TLabel;
- Label23: TLabel;
- Label24: TLabel;
- Label25: TLabel;
- Label26: TLabel;
- Label27: TLabel;
- Label28: TLabel;
- Label29: TLabel;
- Label30: TLabel;
- Label31: TLabel;
- Bevel1: TBevel;
- Bevel2: TBevel;
- Bevel3: TBevel;
- Bevel4: TBevel;
- Bevel5: TBevel;
- Bevel6: TBevel;
- Bevel7: TBevel;
- GroupBox1: TGroupBox;
- GroupBox2: TGroupBox;
- Label34: TLabel;
- Label17: TLabel;
- procedure TabbedNotebook1Change(Sender: TObject; NewTab: Integer;
- var AllowChange: Boolean);
- procedure WinIniSourceActivate(Sender: TObject);
- procedure ListBox1Click(Sender: TObject);
- procedure ListBox2Click(Sender: TObject);
- procedure Btn_BackClick(Sender: TObject);
- procedure Btn_SaveClick(Sender: TObject);
- procedure Btn_NextClick(Sender: TObject);
- procedure Btn_FinishClick(Sender: TObject);
- procedure Btn_ViewClick(Sender: TObject);
- procedure Btn_PlayClick(Sender: TObject);
- procedure Btn_LicenceClick(Sender: TObject);
- procedure SolIniSourceChange(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.Btn_NextClick(Sender: TObject);
- begin
- with tabbednotebook1 do
- pageindex := (pageindex + 1) mod pages.count;
- end;
-
- procedure TForm1.Btn_FinishClick(Sender: TObject);
- begin
- close;
- end;
-
- procedure TForm1.Btn_BackClick(Sender: TObject);
- begin
- with tabbednotebook1 do
- pageindex := (pageindex - 1) mod pages.count;
- end;
-
- procedure TForm1.TabbedNotebook1Change(Sender: TObject; NewTab: Integer;
- var AllowChange: Boolean);
- begin
- Btn_Back.visible := newtab <> 0;
- Btn_Next.enabled := newtab <> pred(tabbednotebook1.pages.count);
- Btn_Save.visible := newtab in [3,6];
- Btn_View.visible := Btn_Save.visible;
- Btn_Play.visible := Btn_Save.visible;
- if newtab in [3,6] then
- Btn_Save.enabled := SolIniSource.Modified;
- end;
-
- procedure TForm1.Btn_SaveClick(Sender: TObject);
- begin
- SolIniSource.save;
- Btn_Save.enabled := SolIniSource.Modified;
- end;
-
- procedure TForm1.WinIniSourceActivate(Sender: TObject);
- begin
- ListBox1.Clear;
- WinIniSource.Inifile.ReadSection('Compatibility',ListBox1.items);
- ListBox2.Clear;
- WinIniSource.Inifile.ReadSection('PrinterPorts',ListBox2.items);
- end;
-
- procedure TForm1.ListBox1Click(Sender: TObject);
- begin
- IniNEdit3.Keyword := Listbox1.Items[ListBox1.itemindex];
- end;
-
- procedure TForm1.ListBox2Click(Sender: TObject);
- begin
- with IniGrid1 do
- begin
- Keyword := Listbox2.Items[ListBox2.itemindex];
- Cells[0,0] := 'Driver:';
- Cells[0,1] := 'Port:';
- Cells[0,2] := 'Device timeout:';
- Cells[0,3] := 'Retry timeout:';
- end;
- end;
-
- procedure TForm1.Btn_ViewClick(Sender: TObject);
- begin
- WinExec ('notepad.exe sol.ini', sw_ShowNormal);
- end;
-
- procedure TForm1.Btn_PlayClick(Sender: TObject);
- begin
- WinExec ('sol.exe', sw_ShowNormal);
- end;
-
- procedure TForm1.SolIniSourceChange(Sender: TObject);
- begin
- Btn_Save.Enabled := SolIniSource.Modified;
- end;
-
- procedure TForm1.Btn_LicenceClick(Sender: TObject);
- begin
- Application.HelpContext(5000);
- end;
-
- end.
-